<template>
	<view class="content">
		<view class="content-block">
			<view class="fold">
				<image v-for="item in photoImageList" :key="item.id" class="img2" @click="preview(item.url)" :src="item.url"></image>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		addModuleCount
	} from '@/api/policy.js';
export default{
	data(){
		return{
			isPreview: false,
			photoImageList:[{
				id: 1,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/1.png",
			},
			{
				id: 2,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/2.png",
			},
			{
				id: 3,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/3.png",
			},
			{
				id: 4,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/4.png",
			},
			{
				id: 5,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/5.png",
			},
			{
				id: 6,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/6.png",
			},
			{
				id: 7,
				url:"https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/fushangma/7.png",
			},]
		}
	},
	methods:{
		getNew() {
			getNewByIdApi({
				id: this.id
			}).then((res) => {
				this.photoImageList = res
			}).catch((res) => {
			})
		},
		preview(photoImage){
			let imgsArray = [];
			imgsArray[0] = photoImage
			uni.previewImage({
				current: 0,
				urls: imgsArray
			});
		},
		getAddModuleCount() {
			addModuleCount({
				type: 9,
			}).then(data => {
				uni.hideLoading()
				this.form = data
			}).catch(() => {
				uni.hideLoading()
			})
		},
	},
	onLoad(e) {
		this.id = e.id;
		// this.getNew();
		// this.getAddModuleCount()
	},
}
</script>

<style lang="scss">
	.content{
		box-sizing: border-box;
		width: 100%;
		min-height: 100vh;
		.content-block{
			width: calc(100% - 60rpx);
			min-height: 100vh;
			// padding: 30rpx;
			margin: 30rpx;
			border-radius: 30rpx;
			background-color: #FFFFFF;
			.video{
				width: 100%;
				margin-top: 20rpx;
			}
			.fold{
				width: 100%;
				margin-top: 20rpx;
				.img2{
					width: 100%;
					height: 470px;
					margin-top: 20rpx;
				}
			}
			
		}
		.cover{
			position: fixed;
			top: 0;
			bottom: 0;
			left: 0;
			right: 0;
			background-color: rgba(0, 0, 0, .8);
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}
</style>